package com.youlu.campus.admin.auth.entity.exception;


import com.youlu.campus.common.exception.ApiErrorCode;

/**
 * Created by zhuhuaiqi
 */
public enum AuthErrorCode implements ApiErrorCode {

    LOGOUT_NAME_NOT_ALLOWD_MODIFIED(1007, "登录名不允许修改"),

    OLD_PASSWORD_NOT_MATCH(1008, "old password not matched"),

    LOGIN_NAME_CONFLICT(1009, "登录名已经存在"),

    USER_NOT_EXISTS(20001, "该账号不存在"),
    INCORRECT_USER(20002, "账号或密码错误"),
    USER_NOT_LOGIN(20003, "该账号未登录"),
    LOGIN_SUCCESS(20004, "该账号登录成功"),
    LOGOUT_SUCCESS(20005, "账号退出登录成功"),
    ERROR_PASSWORD(20006, "密码错误"),
    INVALID_AUTH_TOKEN(20010, "无效的登录凭据"),
    EXPIRED_AUTH_TOKEN(20011, "登录凭据已过期"),
    DOWNLINE_AUTH_TOKEN(20012, "登录已被强制下线"),
    F_LOGIN(20013, "用户被封禁,请联系管理员"),
    UNAUTHORIZED(20021, "资源未授权"),
    USER_NOT_ONLINE(20022, "用户不在线"),
    INVALID_ARGUMENT(20023, "账号或密码错误"),
    COMPANY_NOT_EXIST(20024, "公司不存在"),
    COMPANY_NOT_SUBSRIBE_PACKAGE(20025, "公司未签约套餐"),
    COMPANY_PACKAGE_EXPIRED(20026, "公司购买套餐已经过期,请联系管理员处理"),
    COMPANY_PACKAGE_NO_ENDTIME(20027, "公司购买套餐签约无效,无结束时间"),

    USER_PASSWORD_FORMAT_ERROR(20030, "字符必须包含字母、数字、符号中至少2种"),
    SUPPER_USER_NOT_DELETE(20031, "超级管理员不能被删除"),
    USER_NOT_DELETE_SELF(20032, "删除坐席不能删除自己"),
    LOGIN_EX(20033, "登陆异常,请联系管理员!"),
    CALLCENTER_SEAT_OVER_TOP(3103,"超过购买坐席数量"),
    CALLCENTER_NOT_OPEND(3104,"该企业未开通呼叫功能"),
    CALLCENTER_USER_BUSY(3105,"用户正忙"),
    PUBLIC_KEY_ERROR(3106,"用钥错误"),
    DECRYPT_ERROR(3107,"解密错误"),
    PARAMETER_ERROR(3108,"参数错误"),
    DATA_NOT_EXIST(3109,"数据不存在"),
    DATA_ALREADY_EXIST(3110,"数据已经存在"),
    INVALID_REQUEST(3111,"非法请求,请勿重试!"),
    PASSWORD_RETRY(3113,"密码重试过多,请联系管理员!");

    AuthErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    private final int code;

    private final String message;

    @Override
    public int getCode() {
        return this.code;
    }

    @Override
    public String getMessage() {
        return this.message;
    }
}
